<template>
  <div>
      <h2>仪表盘页面
    {{$store.state.age}} {{age}}
    admin模块下的 {{name}}
    {{$store.state.admin.name}}</h2>
    <el-button type="primary" @click="$store.commit('ToggleMenu')">按钮</el-button>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  computed: {
    ...mapState({
      age: 'age'
    }),
    ...mapState('admin', {
      name: 'name'
    })
  }
}
</script>

<style>

</style>
